/**
 * 
 */
package com.manthano.common.bo;

import com.manthano.scope.bo.StatefulScopeEntity;

/**
 * @author Dell
 */
public class Attachment extends StatefulScopeEntity
{
	/**
	 * 
	 */
	private static final long	serialVersionUID	= -5299746297336613207L;
	/**
	 * TYPE_FILE
	 */
	public static final int		TYPE_FILE			= 10;
	/**
	 * TYPE_WEB
	 */
	public static final int		TYPE_WEB			= 20;

	private String				attachmentId		= null;
	private String				name				= null;
	private String				encoding			= "UTF-8";
	private long				fileSize			= 0;
	private String				path				= null;
	private int					type				= TYPE_FILE;
	private String				visibility			= null;
	private String				comments			= null;

	/**
	 * @return the attachmentId
	 */
	public String getAttachmentId()
	{
		return attachmentId;
	}

	/**
	 * @param attachmentId
	 *            the attachmentId to set
	 */
	public void setAttachmentId(String attachmentId)
	{
		this.attachmentId = attachmentId;
	}

	/**
	 * @return the name
	 */
	public String getName()
	{
		return name;
	}

	/**
	 * @param name
	 *            the name to set
	 */
	public void setName(String name)
	{
		this.name = name;
	}

	/**
	 * @return the encoding
	 */
	public String getEncoding()
	{
		return encoding;
	}

	/**
	 * @param encoding
	 *            the encoding to set
	 */
	public void setEncoding(String encoding)
	{
		this.encoding = encoding;
	}

	/**
	 * @return the fileSize
	 */
	public long getFileSize()
	{
		return fileSize;
	}

	/**
	 * @param fileSize
	 *            the fileSize to set
	 */
	public void setFileSize(long fileSize)
	{
		this.fileSize = fileSize;
	}

	/**
	 * @return the path
	 */
	public String getPath()
	{
		return path;
	}

	/**
	 * @param path
	 *            the path to set
	 */
	public void setPath(String path)
	{
		this.path = path;
	}

	/**
	 * @return the type
	 */
	public int getType()
	{
		return type;
	}

	/**
	 * @param type
	 *            the type to set
	 */
	public void setType(int type)
	{
		this.type = type;
	}

	/**
	 * @return the comments
	 */
	public String getComments()
	{
		return comments;
	}

	/**
	 * @param comments
	 *            the comments to set
	 */
	public void setComments(String comments)
	{
		this.comments = comments;
	}

	/**
	 * @return Exact New Copy of this Attachment
	 */
	public Attachment copy()
	{
		Attachment attachment = new Attachment();
		attachment.setScopeId(this.getScopeId());
		attachment.setAttachmentId(this.attachmentId);
		attachment.setName(this.name);
		attachment.setEncoding(this.encoding);
		attachment.setFileSize(this.fileSize);
		attachment.setPath(this.path);
		attachment.setType(this.getType());
		attachment.setVisibility(this.visibility);
		attachment.setComments(this.comments);
		attachment.setStatus(this.getStatus());
		attachment.setStatusComments(this.getStatusComments());
		attachment.setCreatedBy(this.getCreatedBy());
		attachment.setCreatedOn(this.getCreatedOn());
		attachment.setArchive(this.isArchive());
		attachment.setError(this.isError());
		attachment.setErrorReasons(this.getErrorReasons());
		return attachment;

	}

	/**
	 * @return the visibility
	 */
	public String getVisibility()
	{
		return visibility;
	}

	/**
	 * @param visibility
	 *            the visibility to set
	 */
	public void setVisibility(String visibility)
	{
		this.visibility = visibility;
	}
}
